/**
 * 作者: hxl
 * 日期: 2024-12-17 14:38:42
 * 备注: 推送礼包配置表
 */
package com.motu.monstercity.module.common.iap;

import io.vertx.core.json.JsonObject;

public class IapGiftPushModel {
    protected int id; // id
    protected int iapGiftId; // 礼包ID
    protected int type; // 推送类型
    protected String param; // 参数1
    protected String param2; // 参数2
    protected int pushNum; // 限制推送次数
    protected int mainLimitNum; // 礼包总的推送次数
    protected int buyNum; // 限制购买次数
    protected int intervalTime; // 间隔推送时间 (单位分钟)
    protected String chargeNum; // vip积分范围 (min;max)
    protected int triggerNum; // 每日限制推送次数
    protected int limitLevel; // 等级限制
    protected int mainIapGiftId; // 主类礼包id
    protected String subIapGiftId; // 子礼包ID

    public IapGiftPushModel() {
    }

    public IapGiftPushModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        iapGiftId = obj.containsKey("iap_gift_id") ? obj.getInteger("iap_gift_id") : 0;
        type = obj.containsKey("type") ? obj.getInteger("type") : 0;
        param = obj.containsKey("param") ? obj.getString("param") : "";
        param2 = obj.containsKey("param2") ? obj.getString("param2") : "";
        pushNum = obj.containsKey("push_num") ? obj.getInteger("push_num") : 0;
        mainLimitNum = obj.containsKey("main_limit_num") ? obj.getInteger("main_limit_num") : 0;
        buyNum = obj.containsKey("buy_num") ? obj.getInteger("buy_num") : 0;
        intervalTime = obj.containsKey("interval_time") ? obj.getInteger("interval_time") : 0;
        chargeNum = obj.containsKey("charge_num") ? obj.getString("charge_num") : "";
        triggerNum = obj.containsKey("trigger_num") ? obj.getInteger("trigger_num") : 0;
        limitLevel = obj.containsKey("limit_level") ? obj.getInteger("limit_level") : 0;
        mainIapGiftId = obj.containsKey("main_iap_gift_id") ? obj.getInteger("main_iap_gift_id") : 0;
        subIapGiftId = obj.containsKey("sub_iap_gift_id") ? obj.getString("sub_iap_gift_id") : "";
    }

    public int getId() {
        return id;
    }

    public int getIapGiftId() {
        return iapGiftId;
    }

    public int getType() {
        return type;
    }

    public String getParam() {
        return param;
    }

    public String getParam2() {
        return param2;
    }

    public int getPushNum() {
        return pushNum;
    }

    public int getMainLimitNum() {
        return mainLimitNum;
    }

    public int getBuyNum() {
        return buyNum;
    }

    public int getIntervalTime() {
        return intervalTime;
    }

    public String getChargeNum() {
        return chargeNum;
    }

    public int getTriggerNum() {
        return triggerNum;
    }

    public int getLimitLevel() {
        return limitLevel;
    }

    public int getMainIapGiftId() {
        return mainIapGiftId;
    }

    public String getSubIapGiftId() {
        return subIapGiftId;
    }

}
